package com.itheima.controller;

import com.itheima.entity.ClazzSizeOption;
import com.itheima.entity.Result;
import com.itheima.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Description ReportControlle
 * @Author 你的名字拼接或昵称
 * @Date 2025-09-07
 */
@Slf4j
@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;

    //学员学历统计
    @GetMapping("/studentDegreeData")
    public Result getstudegree(){
        List<Map<String,Object>>list=reportService.getstudegree();
        return Result.success(list);
    }
    @GetMapping("/studentCountData")
    public Result getstudentCount(){
        ClazzSizeOption clazzSizeOption= reportService.getClazzData();
        return Result.success(clazzSizeOption);
    }
}
